SlkAdministration.SaveConfiguration Method

Saves SLK configuration information. This method accepts information in a form that's compatible with Configure.aspx form fields.

Parent Type: SlkAdministration

Namespace: Microsoft.SharePointLearningKit

Assembly: Microsoft.SharePointLearningKit.dll

Syntax
C#

public static void SaveConfiguration (
Guid spSiteGuid,
string databaseServer,
string databaseName,
string schemaToCreateDatabase,
string instructorPermission,
string learnerPermission,
bool createPermissions,
string settingsFileContents,
string defaultSettingsFileContents,
string appPoolAccountName,
ImpersonationBehavior createDatabaseImpersonationBehavior

)

Parameters

spSiteGuid

The GUID of the SPSite being configured.

databaseServer

The name of the database server to associate with the specified SPSite. By default, integrated authentication is used to connect to the database; to use a SQL Server user ID and password instead, append the appropriate connection string information to the database server name -- for example, instead of "MyServer", use "MyServer;user id=myacct;password=mypassword". For security reasons, integrated authentication is strongly recommended.

databaseName

The name of the database to associate with the specified SPSite. This database must exist if schemaToCreateDatabase is null, and must not exist if paramref name="schemaToCreateDatabase"/> is non-null, otherwise an error message is returned.

schemaToCreateDatabase

If non-null, this is the SlkSchema.sql file containing the schema of the database, and an SLK database named databaseName is created using this schema. If null, databaseName specifies an existing database.

instructorPermission

The name of the SharePoint permission that identifies instructors.

learnerPermission

The name of the SharePoint permission that identifies learners.

createPermissions

If true, the permissions specified by instructorPermission and learnerPermission are added to the root SPWeb of the specified SPSite (if they don't already exist).

settingsFileContents

If not null, this is the contents of a SLK Settings file to associate with this SPSite. If null, the previous SLK Settings file is used if one exists, or the default SLK settings file is used if a database is being created.

defaultSettingsFileContents

The contents of the default SLK Settings file. Must not be null.

appPoolAccountName

The name of the application pool account; for example, "NT AUTHORITY\NETWORK SERVICE". If null, then the current Windows identity is used, or, if the current identity is impersonated, the original Windows identity is used.

createDatabaseImpersonationBehavior

Identifies which WindowsIdentity is used to create the database.

Exceptions
Exception type Condition
SafeToDisplayException

An error occurred that can be displayed to a browser user.

Remarks

This method is static so it can used outside the context of IIS. Only SharePoint administrators can perform this function.